﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="WebForm2.aspx.vb" Inherits="travel.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
            font-size: medium;
        }
        .auto-style2 {
            font-size: larger;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="HotelName" HeaderText="HotelName" SortExpression="HotelName" />
                <asp:BoundField DataField="StarRating" HeaderText="StarRating" SortExpression="StarRating" />
                <asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location" />
                <asp:BoundField DataField="HotelUrl" HeaderText="HotelUrl" SortExpression="HotelUrl" />
                <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
                <asp:BoundField DataField="ContactDetails" HeaderText="ContactDetails" SortExpression="ContactDetails" />
                <asp:ImageField DataImageUrlField="HotelPicture" HeaderText="Picture">
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Hotels] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" >
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT [Author], [Comment] FROM [Comments] WHERE ([Fk_Id] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Fk_Id" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p class="auto-style1">
        <strong>Would you like to comment on this hotel ? Please do so below.</strong></p>
    <p>
        &nbsp;</p>
    <p>
        Comment Title :
        <asp:TextBox ID="tb_CommentTitle" runat="server"></asp:TextBox>
    </p>
    <p>
        Comments:
        <asp:TextBox ID="tb_Comment" runat="server" Height="154px" TextMode="MultiLine" Width="488px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="bt_AddComment" runat="server" Text="Add Your Comment!" />
    </p>
    <p>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="TagDataSource2" DataTextField="Tag" DataValueField="ID" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="TagDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:TravelConnectionString %>" ProviderName="<%$ ConnectionStrings:TravelConnectionString.ProviderName %>" SelectCommand="SELECT DISTINCT * FROM [Tags] WHERE ([Tag] &lt;&gt; ?)">
            <SelectParameters>
                <asp:Parameter DefaultValue=" " Name="Tag" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:Button ID="bt_TagHotel" runat="server" Text="Tag this Hotel" />
    </p>
    <p>
        <span class="auto-style2"><strong>Didn&#39;t find correct tag for this hotel&nbsp; ? Add new ones below ! Please separate with commas</strong></span></p>
    <p>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
    </p>
</asp:Content>
